/*
 * Frame.java
 *
 * Created on 15-Mar-2012, 10:33:19
 */
package game;

/**
 *
 * @author s1131662
 */
public class Frame extends javax.swing.JFrame {

    /** Creates new form Frame */
    public Frame() {
        initComponents();
        init();
    }
    
    
    private void init() {
        // TO-DO initialise the tree
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        answersGroup = new javax.swing.ButtonGroup();
        mainPanel = new javax.swing.JPanel();
        questionLabel = new javax.swing.JLabel();
        answerPanel = new javax.swing.JPanel();
        answerOneRadioButton = new javax.swing.JRadioButton();
        answerTwoRadioButton = new javax.swing.JRadioButton();
        answerButton = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("20 question game");
        setMinimumSize(new java.awt.Dimension(600, 600));
        getContentPane().setLayout(new java.awt.FlowLayout());

        mainPanel.setLayout(new java.awt.BorderLayout(0, 10));

        questionLabel.setText("Question");
        mainPanel.add(questionLabel, java.awt.BorderLayout.NORTH);

        answerPanel.setLayout(new java.awt.GridLayout(3, 1));

        answersGroup.add(answerOneRadioButton);
        answerOneRadioButton.setText("answer1");
        answerPanel.add(answerOneRadioButton);

        answersGroup.add(answerTwoRadioButton);
        answerTwoRadioButton.setText("answer2");
        answerPanel.add(answerTwoRadioButton);

        answerButton.setText("Choose");
        answerButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                answerButtonActionPerformed(evt);
            }
        });
        answerPanel.add(answerButton);

        mainPanel.add(answerPanel, java.awt.BorderLayout.CENTER);

        getContentPane().add(mainPanel);

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void answerButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_answerButtonActionPerformed
        questionLabel.setText("Hello");
    }//GEN-LAST:event_answerButtonActionPerformed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {

            public void run() {
                new Frame().setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton answerButton;
    private javax.swing.JRadioButton answerOneRadioButton;
    private javax.swing.JPanel answerPanel;
    private javax.swing.JRadioButton answerTwoRadioButton;
    private javax.swing.ButtonGroup answersGroup;
    private javax.swing.JPanel mainPanel;
    private javax.swing.JLabel questionLabel;
    // End of variables declaration//GEN-END:variables

    
}

